$TotalMsg = CountMessage([DeviceId])
Returns the total number of messages
present in the message queue of the specified device.
Parameters
[DeviceId]
The device from which the total count
of messages is retrieved.
Return Value
Remarks
- Every thread maintains a message queue, into which we can put or get message
for the purpose of inter-thread communication.The total number of messages present in the message queue of the specified device is the
return value of CountMessage().
- If deviceid is not specified, then the total number of messages
in the current device is returned.
- If an invalid deviceid is specified, then the return value will be zero.
Example
1) PutMessage ("Welcome all")
$TotalMsg = CountMessage()
2) PutMessage (5,"Welcome all")
$TotalMsg = CountMessage(5)